package test;

public class Conta implements Runnable
{
	private int up;
	public Conta(int x)
	{
		up = x;
	}

	public void run()
	{
		threadMessage("Start!");
		for (int i = 0; i < up; i++)
			threadMessage("" + (1 + i));
		threadMessage("Finish!");
	}

	// Display a message, preceded by the name of the current thread
	static void threadMessage(String message)
	{
		String threadName = Thread.currentThread().getName();
		System.out.println(threadName + ": " + message);
	}

}